package com.tuoxie.practice;
import java.util.Scanner;

public class _01 {
    public static void main (String[] args) {
        // Switch新特性(新版本)
        Scanner scan = new Scanner(System.in);
        System.out.println("Enter number:");
        int num = scan.nextInt();

        switch (num) {
            case 1 -> System.out.println("one");
            case 2 -> System.out.println("two");
            case 3 -> System.out.println("three");
            default -> System.out.println("没有匹配到此数字");
        }
        // 新特性可以省略大括号以及break
    }
}
